package com.qf.service.impl;

import com.qf.dao.AccountDao;
import com.qf.service.AccountService;

/**
 * @author 千锋教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
public class AccountServiceImpl implements AccountService {

    AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void transfer(String fromName, String toName, double money) {

        accountDao.minusAccount(fromName ,money);
        int i = 1/0;
        accountDao.plusAccount(toName ,money);
    }


}
